<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="content0" style="width: 100%; height: 500px;"></div>
</body>
</html>

<script src="jquery/jquery-1.12.4.min.js"></script>

<script src="js/echarts.js"></script>
<script>
    $(function () {
        $.ajax({
            type:'get',
            url:'/studentData/status',
            success:function (res) {
                var myChart0 = echarts.init(document.getElementById('content0'));

                // 指定图表的配置项和数据
                var option0 = {
                    title: {
                        text: '申请统计'
                    },
                    tooltip: {},
                    legend: {
                        data: ['学员人数']
                    },
                    xAxis: {
                        data: [],
                        //     xAxis.axisLabel. overflow = 'none'
                        nameTextStyle:{
                            overflow:'break'
                        },
                        axisLabel:{
                            interval:'0',
                            rotate:0
                        }
                    },
                    yAxis: {},
                    series: [
                        {
                            name: '人数',
                            type: 'bar',
                            data: []
                        }
                    ]
                };
                $(res.data).each(function (index0,item0) {
                    option0.xAxis.data.push(item0.status)
                    option0.series[0].data.push(item0.number)
                })

                // 使用刚指定的配置项和数据显示图表。
                myChart0.setOption(option0);
            }
        })
    })
</script>